package com.laowang.project.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.laowang.framework.aspectj.lang.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 用户购买的商家团购商品对象 my_product
 *
 * @author laowang
 * @date 2024-05-28
 */
@NoArgsConstructor
@Data
public class MyProduct implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @ApiModelProperty(value = "${comment}", required = false)
    private Integer id;

    /**
     * 关联的商家团购
     */
    @Excel(name = "关联的商家团购")
    @ApiModelProperty(value = "关联的商家团购", required = false)
    private Integer shopProductId;

    /**
     * $column.columnComment
     */
    @Excel(name = "关联的商家团购")
    @ApiModelProperty(value = "关联的商家团购", required = false)
    private Integer userId;

    /**
     * 0未核销,1已核销
     */
    @Excel(name = "0未核销,1已核销")
    @ApiModelProperty(value = "0未核销,1已核销", required = false)
    private Integer isCheck;

    /**
     * 到期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "到期时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "到期时间", required = false)
    private Date expireTime;

    /**
     * 商家id
     */
    @Excel(name = "商家id")
    @ApiModelProperty(value = "商家id", required = false)
    private Integer shopId;

    private String[] split;

    /**
     * $column.columnComment
     */
    @Excel(name = "商家id")
    @ApiModelProperty(value = "商家id", required = false)
    private String name;

    /**
     * $column.columnComment
     */
    @Excel(name = "商家id")
    @ApiModelProperty(value = "商家id", required = false)
    private BigDecimal price;

    /**
     * $column.columnComment
     */
    @Excel(name = "商家id")
    @ApiModelProperty(value = "商家id", required = false)
    private String desc;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "商家id", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "商家id", required = false)
    private Date created;

    /**
     * 核销时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "核销时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "核销时间", required = false)
    private Date checkTime;

    /**
     * 订单id
     */
    @Excel(name = "订单id")
    @ApiModelProperty(value = "订单id", required = false)
    private String orderId;

    private String img;

    @Transient
    private String shopName;
}
